import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import axios from 'axios'
import '../public/radio/icheck-material.min.css'
import '../public/radio/icheck-material-custom.min.css'
axios.defaults.baseURL='http://localhost:8088/api'
// axios.defaults.baseURL='https://www.fastmock.site/mock/8a589047758103fc4dac501a3dbe8561/api'
//跨域请求时带session
axios.defaults.withCredentials=true
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//引入存贮
import store from './store'
import VMdEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';
// Prism
import Prism from 'prismjs';
// highlight code
import 'prismjs/components/prism-json';
import * as echarts from 'echarts';
import zhCn from 'element-plus/es/locale/lang/zh-cn'


let app = createApp(App);
app.config.globalProperties.$axios=axios
app.use(ElementPlus, {
    locale: zhCn,
})
//使用存贮
app.use(store)
VMdEditor.use(vuepressTheme, {
    Prism,
});
app.use(VMdEditor);
app.use(router).mount('#app')

app.config.globalProperties.$echarts = echarts